package cash.cmp.personal_financial_system.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class SysMsg implements Serializable {

    // 主键
    String msgId;
    Integer sendId;
    Integer objectId;
    String msg;
    // 0 表示用户消息， 1 表示系统消息;
    Integer type;
    // 0 表示用户未读， 1 表示用户已读；
    Integer readState;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    Date sendTime;

    public SysMsg() {
    }

    public SysMsg(String msgId, Integer sendId, Integer objectId, String msg, Integer type, Integer readState, Date sendTime) {
        this.msgId = msgId;
        this.sendId = sendId;
        this.objectId = objectId;
        this.msg = msg;
        this.type = type;
        this.readState = readState;
        this.sendTime = sendTime;
    }

    @Override
    public String toString() {
        return "SysMsg{" +
                "msgId=" + msgId +
                ", sendId=" + sendId +
                ", objectId=" + objectId +
                ", msg='" + msg + '\'' +
                ", type=" + type +
                ", readState=" + readState +
                ", sendTime=" + sendTime +
                '}';
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getReadState() {
        return readState;
    }

    public void setReadState(Integer readState) {
        this.readState = readState;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }
    public int getSendId() {
        return sendId;
    }

    public void setSendId(int sendId) {
        this.sendId = sendId;
    }

    public int getObjectId() {
        return objectId;
    }

    public void setObjectId(int objectId) {
        this.objectId = objectId;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
